// 技能项
export interface Skill {
  skillName: string
  proficiency: string
  description: string
}

// 实习经历
export interface InternExperience {
  company: string
  position: string
  startDate: string
  endDate: string
  content: string
}

// 语言能力
export interface Language {
  language: string
  level: string
  score: string
}

// 奖项
export interface Award {
  name: string
  issuer: string
  getDate: string
}

// 简历请求参数
export interface ResumeAddOrUpdateRequest {
  userId: number
  resumeName: string
  isDefault: number
  skills: Skill[]
  internExperiences: InternExperience[]
  languages: Language[]
  awards: Award[]
  otherInfo: string
  resumePdfUrl: string
  status: number
}

// 简历详情响应
export interface ResumeDetail {
  resumeId: number
  userId: number
  resumeName: string
  isDefault: number
  skills: Skill[]
  internExperiences: InternExperience[]
  languages: Language[]
  awards: Award[]
  otherInfo: string
  resumePdfUrl: string
  resumePdfGenerateTime: string
  status: string
  createTime: string
  updateTime: string
}

// 简历列表项响应
export interface ResumeListItem {
  resumeId: number
  userId: number
  resumeName: string
  isDefault: number
  status: string
  createTime: string
  updateTime: string
}

// 简历分页列表
export interface ResumePageList {
  records: ResumeListItem[]
  total: number
  size: number
  current: number
  pages: number
}

export interface ResumeListQuery {
  /**
   * 简历名称（用于搜索）
   */
  keyword?: string

  /**
   * 用户ID（用于筛选用户的简历）
   */
  userId: number

  /**
   * 页码
   */
  page: number

  /**
   * 每页条数
   */
  size: number

}

export interface ResumeSimple {
  resumeId: number
  resumeName: string
  isDefault: number
  resumeUrl: string
}

// 响应类型
export type ResumeDetailResponse = ApiResponseData<ResumeDetail>
export type ResumeListResponse = ApiResponseData<ResumePageList>
export type CreateOrUpdateResumeResponse = ApiResponseData<{ success: boolean }>
export type ResumeSimpleListResponse = ApiResponseData<ResumeSimple[]>
